 CREATE EXTERNAL TABLE jms_dwd.dwd_yl_oms_oms_waybill_overtime_dt(
   `id` bigint COMMENT '主键id',
   `waybill_no` string COMMENT '运单号',
   `waybill_status_code` bigint COMMENT '运单状态code',
   `goods_type_id` bigint COMMENT '物品类型id',
   `goods_type_code` string COMMENT '物品类型code',
   `goods_type_name` string COMMENT '物品类型名称',
   `goods_name` string COMMENT '物品名称',
   `package_length` double COMMENT '包裹总长,单位厘米',
   `package_wide` double COMMENT '包裹总宽,单位厘米',
   `package_high` double COMMENT '包裹总高,单位厘米',
   `package_volume` double COMMENT '包裹体积重,单位千克',
   `package_total_volume` decimal(14,2) COMMENT '包裹总体积,单位立方厘米',
   `package_charge_weight` decimal(14,2) COMMENT '包裹计费重量,单位千克',
   `collect_staff_code` string COMMENT '揽件业务员code',
   `collect_time` timestamp COMMENT '揽件时间',
   `dispatch_staff_code` string COMMENT '派件业务员code',
   `dispatch_staff_name` string COMMENT '派件业务员名称',
   `dispatch_time` timestamp COMMENT '派件时间',
   `dispatch_network_code` string COMMENT '派件网点code',
   `dispatch_network_name` string COMMENT '派件网点名称',
   `exception_code` string COMMENT '异常原因编码',
   `terminal_dispatch_code` string COMMENT '三段码',
   `first_code` string COMMENT '一段码',
   `second_code` string COMMENT '二段码',
   `third_code` string COMMENT '三段码',
   `is_sign` smallint COMMENT '签收标识,1是，0否',
   `sign_network_code` string COMMENT '签收网点code',
   `sign_network_name` string COMMENT '签收网点名称',
   `sign_finance_code` string COMMENT '签收财务网点编码',
   `sign_time` timestamp COMMENT '签收时间',
   `is_abnormal` smallint COMMENT '问题件标识,1是，0否',
   `abnormal_reg_network_code` string COMMENT '问题件登记网点code',
   `abnormal_reg_time` timestamp COMMENT '问题件登记时间',
   `customer_order_id` string COMMENT '客户订单编号',
   `waybill_source_code` string COMMENT '运单来源code',
   `waybill_source_name` string COMMENT '运单来源名称',
   `is_void` smallint COMMENT '是否作废件,1是，0否',
   `is_refund` smallint COMMENT '是否退件,1是，0否',
   `customer_code` string COMMENT '客户编号code',
   `customer_name` string COMMENT '客户编号名称',
   `sender_name` string COMMENT '寄件人姓名',
   `sender_province_id` bigint COMMENT '寄件省份id',
   `sender_city_id` bigint COMMENT '寄件城市id',
   `sender_area_id` bigint COMMENT '寄件区域Id',
   `sender_township` string COMMENT '寄件乡镇',
   `sender_street` string COMMENT '寄件街道',
   `sender_detailed_address` string COMMENT '寄件详细地址',
   `origin_id` bigint COMMENT '始发地id',
   `pick_network_code` string COMMENT '寄件网点code',
   `pick_network_name` string COMMENT '寄件网点名称',
   `freight` decimal(14,2) COMMENT '运费',
   `total_freight` decimal(14,2) COMMENT '总运费',
   `pick_finance_code` string COMMENT '寄件财务中心code',
   `dispatch_finance_code` string COMMENT '派件财务中心code',
   `receiver_name` string COMMENT '收件人姓名',
   `receiver_province_id` bigint COMMENT '收件省份id',
   `receiver_city_id` bigint COMMENT '收件城市id',
   `receiver_area_id` bigint COMMENT '收件区域id',
   `receiver_township` string COMMENT '收件乡镇',
   `receiver_street` string COMMENT '收件街道',
   `receiver_detailed_address` string COMMENT '收件详细地址',
   `destination_id` bigint COMMENT '目的地id',
   `receiver_sorting_code` string COMMENT '收件分拣码',
   `input_time` timestamp COMMENT '录入时间',
   `input_network_code` string COMMENT '录入网点code',
   `settlement_weight` decimal(14,2) COMMENT '结算重量',
   `order_source_code` string COMMENT '订单来源编码',
   `last_update_time` timestamp COMMENT '最后更新时间',
   `is_delete` smallint COMMENT '是否删除,1未删除，2已删除',
   `package_collect_weight` double COMMENT '收件重量,单位千克',
   `package_receipt_weight` double COMMENT '入仓重量,单位千克',
   `package_arrival_weight` double COMMENT '集散到件重量,单位千克',
   `package_inside_charge_weight` decimal(14,2) COMMENT '内部计费重量,单位千克',
   `waybill_weight` double COMMENT '运单重量,单位千克',
   `is_business` smallint COMMENT '是否是商务件：0否，1是',
   `is_receive` smallint COMMENT '是否已收款,1是，0否',
   `express_type_code` string COMMENT '产品类型code',
   `express_type_name` string COMMENT '产品类型名称',
   `etl_load_time` timestamp COMMENT '数据录入hdfs时间')
 COMMENT '运单30天超时更新表，这里记录每天新增变化数据中，更新时间超过过去30天的运单数据'
 PARTITIONED BY (
   `dt` string COMMENT '更新/创建日期(yyyy-MM-dd)')
 ROW FORMAT SERDE
   'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
 STORED AS INPUTFORMAT
   'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
 OUTPUTFORMAT
   'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
 LOCATION
   '/dw/hive/jms_dwd.db/external/dwd_yl_oms_oms_waybill_overtime_dt'
 TBLPROPERTIES (
   'discover.partitions'='false',
   'parquet.column.index.access'='true')